3.195 \(\int \csc (c+b x) \sin (a+b x) \, dx\)

Optimal. Leaf size=26 \[ \frac{\sin (a-c) \log (\sin (b x+c))}{b}+x \cos (a-c) \]

[Out]

x*Cos[a - c] + (Log[Sin[c + b*x]]*Sin[a - c])/b

________________________________________________________________________________________

Rubi [A]  time = 0.0274765, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {4582, 3475, 8} \[ \frac{\sin (a-c) \log (\sin (b x+c))}{b}+x \cos (a-c) \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + b*x]*Sin[a + b*x],x]

[Out]

x*Cos[a - c] + (Log[Sin[c + b*x]]*Sin[a - c])/b

Rule 4582

Int[Csc[w_]^(n_.)*Sin[v_], x_Symbol] :> Dist[Sin[v - w], Int[Cot[w]*Csc[w]^(n - 1), x], x] + Dist[Cos[v - w],
Int[Csc[w]^(n - 1), x], x] /; GtQ[n, 0] && FreeQ[v - w, x] && NeQ[w, v]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \csc (c+b x) \sin (a+b x) \, dx &=\cos (a-c) \int 1 \, dx+\sin (a-c) \int \cot (c+b x) \, dx\\ &=x \cos (a-c)+\frac{\log (\sin (c+b x)) \sin (a-c)}{b}\\ \end{align*}

Mathematica [A]  time = 0.140974, size = 26, normalized size = 1. \[ \frac{\sin (a-c) \log (\sin (b x+c))}{b}+x \cos (a-c) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + b*x]*Sin[a + b*x],x]

[Out]

x*Cos[a - c] + (Log[Sin[c + b*x]]*Sin[a - c])/b

________________________________________________________________________________________

Maple [B]  time = 0.201, size = 325, normalized size = 12.5 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(b*x+c)*sin(b*x+a),x)

[Out]

1/2/b/(cos(c)^2+sin(c)^2)/(cos(a)^2+sin(a)^2)*ln(1+tan(b*x+a)^2)*cos(a)*sin(c)-1/2/b/(cos(c)^2+sin(c)^2)/(cos(
a)^2+sin(a)^2)*ln(1+tan(b*x+a)^2)*sin(a)*cos(c)+1/b/(cos(c)^2+sin(c)^2)/(cos(a)^2+sin(a)^2)*cos(a)*cos(c)*arct
an(tan(b*x+a))+1/b/(cos(c)^2+sin(c)^2)/(cos(a)^2+sin(a)^2)*sin(a)*sin(c)*arctan(tan(b*x+a))-1/b/(cos(a)^2*cos(
c)^2+cos(a)^2*sin(c)^2+cos(c)^2*sin(a)^2+sin(a)^2*sin(c)^2)*ln(tan(b*x+a)*cos(a)*cos(c)+tan(b*x+a)*sin(a)*sin(
c)+cos(a)*sin(c)-sin(a)*cos(c))*cos(a)*sin(c)+1/b/(cos(a)^2*cos(c)^2+cos(a)^2*sin(c)^2+cos(c)^2*sin(a)^2+sin(a
)^2*sin(c)^2)*ln(tan(b*x+a)*cos(a)*cos(c)+tan(b*x+a)*sin(a)*sin(c)+cos(a)*sin(c)-sin(a)*cos(c))*sin(a)*cos(c)

________________________________________________________________________________________

Maxima [B]  time = 1.3371, size = 146, normalized size = 5.62 \begin{align*} \frac{2 \, b x \cos \left (-a + c\right ) - \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \left (c\right ) + \cos \left (c\right )^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \left (c\right ) + \sin \left (c\right )^{2}\right ) \sin \left (-a + c\right ) - \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \left (c\right ) + \cos \left (c\right )^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \left (c\right ) + \sin \left (c\right )^{2}\right ) \sin \left (-a + c\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+c)*sin(b*x+a),x, algorithm="maxima")

[Out]

1/2*(2*b*x*cos(-a + c) - log(cos(b*x)^2 + 2*cos(b*x)*cos(c) + cos(c)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(c) + sin(
c)^2)*sin(-a + c) - log(cos(b*x)^2 - 2*cos(b*x)*cos(c) + cos(c)^2 + sin(b*x)^2 + 2*sin(b*x)*sin(c) + sin(c)^2)
*sin(-a + c))/b

________________________________________________________________________________________

Fricas [A]  time = 0.495983, size = 77, normalized size = 2.96 \begin{align*} \frac{b x \cos \left (-a + c\right ) - \log \left (\frac{1}{2} \, \sin \left (b x + c\right )\right ) \sin \left (-a + c\right )}{b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+c)*sin(b*x+a),x, algorithm="fricas")

[Out]

(b*x*cos(-a + c) - log(1/2*sin(b*x + c))*sin(-a + c))/b

________________________________________________________________________________________

Sympy [B]  time = 18.4057, size = 335, normalized size = 12.88 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+c)*sin(b*x+a),x)

[Out]

Piecewise((0, Eq(b, 0) & (Eq(b, 0) | Eq(c, 0))), (x, Eq(c, 0)), (-b*x*tan(c/2)**2/(b*tan(c/2)**2 + b) + b*x/(b
*tan(c/2)**2 + b) - 2*log(tan(c/2) + tan(b*x/2))*tan(c/2)/(b*tan(c/2)**2 + b) - 2*log(tan(b*x/2) - 1/tan(c/2))
*tan(c/2)/(b*tan(c/2)**2 + b) + 2*log(tan(b*x/2)**2 + 1)*tan(c/2)/(b*tan(c/2)**2 + b), True))*cos(a) + Piecewi
se((zoo*x, Eq(b, 0) & Eq(c, 0)), (x/sin(c), Eq(b, 0)), (log(sin(b*x))/b, Eq(c, 0)), (2*b*x*tan(c/2)/(b*tan(c/2
)**2 + b) - log(tan(c/2) + tan(b*x/2))*tan(c/2)**2/(b*tan(c/2)**2 + b) + log(tan(c/2) + tan(b*x/2))/(b*tan(c/2
)**2 + b) - log(tan(b*x/2) - 1/tan(c/2))*tan(c/2)**2/(b*tan(c/2)**2 + b) + log(tan(b*x/2) - 1/tan(c/2))/(b*tan
(c/2)**2 + b) + log(tan(b*x/2)**2 + 1)*tan(c/2)**2/(b*tan(c/2)**2 + b) - log(tan(b*x/2)**2 + 1)/(b*tan(c/2)**2
 + b), True))*sin(a)

________________________________________________________________________________________

Giac [B]  time = 1.2109, size = 319, normalized size = 12.27 \begin{align*} \frac{\frac{{\left (\tan \left (\frac{1}{2} \, a\right )^{2} \tan \left (\frac{1}{2} \, c\right )^{2} - \tan \left (\frac{1}{2} \, a\right )^{2} + 4 \, \tan \left (\frac{1}{2} \, a\right ) \tan \left (\frac{1}{2} \, c\right ) - \tan \left (\frac{1}{2} \, c\right )^{2} + 1\right )}{\left (b x + c\right )}}{\tan \left (\frac{1}{2} \, a\right )^{2} \tan \left (\frac{1}{2} \, c\right )^{2} + \tan \left (\frac{1}{2} \, a\right )^{2} + \tan \left (\frac{1}{2} \, c\right )^{2} + 1} - \frac{2 \,{\left (\tan \left (\frac{1}{2} \, a\right )^{2} \tan \left (\frac{1}{2} \, c\right ) - \tan \left (\frac{1}{2} \, a\right ) \tan \left (\frac{1}{2} \, c\right )^{2} + \tan \left (\frac{1}{2} \, a\right ) - \tan \left (\frac{1}{2} \, c\right )\right )} \log \left (\tan \left (\frac{1}{2} \, b x + \frac{1}{2} \, c\right )^{2} + 1\right )}{\tan \left (\frac{1}{2} \, a\right )^{2} \tan \left (\frac{1}{2} \, c\right )^{2} + \tan \left (\frac{1}{2} \, a\right )^{2} + \tan \left (\frac{1}{2} \, c\right )^{2} + 1} + \frac{2 \,{\left (\tan \left (\frac{1}{2} \, a\right )^{2} \tan \left (\frac{1}{2} \, c\right ) - \tan \left (\frac{1}{2} \, a\right ) \tan \left (\frac{1}{2} \, c\right )^{2} + \tan \left (\frac{1}{2} \, a\right ) - \tan \left (\frac{1}{2} \, c\right )\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, b x + \frac{1}{2} \, c\right ) \right |}\right )}{\tan \left (\frac{1}{2} \, a\right )^{2} \tan \left (\frac{1}{2} \, c\right )^{2} + \tan \left (\frac{1}{2} \, a\right )^{2} + \tan \left (\frac{1}{2} \, c\right )^{2} + 1}}{b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+c)*sin(b*x+a),x, algorithm="giac")

[Out]

((tan(1/2*a)^2*tan(1/2*c)^2 - tan(1/2*a)^2 + 4*tan(1/2*a)*tan(1/2*c) - tan(1/2*c)^2 + 1)*(b*x + c)/(tan(1/2*a)
^2*tan(1/2*c)^2 + tan(1/2*a)^2 + tan(1/2*c)^2 + 1) - 2*(tan(1/2*a)^2*tan(1/2*c) - tan(1/2*a)*tan(1/2*c)^2 + ta
n(1/2*a) - tan(1/2*c))*log(tan(1/2*b*x + 1/2*c)^2 + 1)/(tan(1/2*a)^2*tan(1/2*c)^2 + tan(1/2*a)^2 + tan(1/2*c)^
2 + 1) + 2*(tan(1/2*a)^2*tan(1/2*c) - tan(1/2*a)*tan(1/2*c)^2 + tan(1/2*a) - tan(1/2*c))*log(abs(tan(1/2*b*x +
 1/2*c)))/(tan(1/2*a)^2*tan(1/2*c)^2 + tan(1/2*a)^2 + tan(1/2*c)^2 + 1))/b